package base.demo;

public class Person {

    private int age;
    private String name;

    public Person(int age, String name) {
        super();
        this.age = age;
        this.name = name;

        System.out.println("person(int age, String name)  is running ");
    }

    public Person() {
        super();
        System.out.println("person()  is running");
    }

    public void show() {
        System.out.println(name + "show  run " + age);
    }


    private void privateMethode() {
        System.out.println("this  method is private");
    }

    public void paramMethod(String str, int number) {
        System.out.println(" paramsMethod  is run  " + str + "  ..  number=" + number);
    }

    public static void staticMethod() {
        System.out.println("static method run...");
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}














